home *** CD-ROM | disk | FTP | other *** search
/ Super Audio / Super Audio.iso / replay / _armovie / documents / join < prev    next >
Text File  |  1997-11-10  |  21KB  |  407 lines

  1.  
  2.                               HOW TO RUN JOIN
  3.                               +++++++++++++++
  4.   
  5.   
  6.                         Related Documents: ToRunDiff
  7.                                            AE7doc
  8.                                            Extract (Version 2.19, 29 Apr. 1994).
  9.  
  10. Author:    CRose
  11. Date:      16 May, 1994.
  12. Version:   3.07
  13. File Name: join
  14.  
  15.  
  16.                    
  17.  
  18. WHAT DOES JOIN DO? - takes the components of an ARMovie and joins them together
  19. -----------------    to produce ARMovie files with or without video images 
  20.                      and with or without sound.  It can also produce ARMovie
  21.                      files with multiple sound tracks if video images are
  22.                      required, and when building a movie it can compress sound
  23.                      at 16 bits per sample down to 4 bits per sample (format 2,
  24.                      adpcm).
  25.   
  26.  
  27. THE SOURCE DATA - you need a directory containing the following:
  28. ---------------
  29.   
  30. *  a file called "Header"  (more info. further down).
  31. *  a sprite.
  32. *  Images: [optional - without this data the ARMovie file generated will 
  33.                        be sound only and will contain only one sound track]
  34.                
  35.    an Images0 directory containing image files called 00, 01, 02, 03,
  36.    and so on up to a maximum of 76. After this you need to create 
  37.    another Images directory called Images1 and then carry on with 
  38.    00,01,02, etc. again.
  39.  
  40. *  Keys data:  Same naming convention as above.  i.e. e.g. Keys0.00,
  41.    Keys0.01, etc.
  42.  
  43. *  Sound data: sound can be read from an already existing ARMovie file
  44.    or by default from data format files. 
  45.    
  46.       DATA FORMAT FILES:  the following files must exist in the source
  47.                           directory:
  48.                           
  49.         For 8 bits per sample (exponential) - (line 13 in the header file):
  50.         Need at least one sound track (obviously).
  51.         
  52.                           Sound       /* 1st soundtrack */
  53.                           Sound2      /* 2nd soundtrack */
  54.                           Sound3      /* and so on ...  */
  55.                           Sound4      
  56.                            etc.
  57.                    
  58.         For 16 bits per sample - (line 13 in header file):
  59.         As above: 
  60.                           Samples
  61.                           Samples2
  62.                           Samples3
  63.                            etc.
  64.                            
  65.         For 4 bits per sample - (line 13 in header file):
  66.         As above:                               
  67.                           Adpcm
  68.                           Adpcm2
  69.                            etc.
  70.                        
  71.       ARMOVIE FILE: join must be supplied with the full path name
  72.                     of this file on the command line.
  73.       
  74.       
  75. THE HEADER FILE:
  76. ---------------
  77.     
  78.       The Header file used by Join must comply with the following format (examples
  79.       further below), and it must be kept in the same directory as the sprite, 
  80.       image, keys, and sound data (see section above - "The Source Data").  If
  81.       more than one sound track is required then lines 10 to 13 will be slightly
  82.       different.  This is explained under the heading "Multiple Sound Tracks" 
  83.       further down. 
  84.             
  85.     String          ARMovie
  86.     String          Movie name
  87.     String          date and copyright details
  88.     String          author and other details
  89.     String          video compression format identifier     [1][0 -> no video]
  90.     Decimal number  x size in pixels
  91.     Decimal number  y size in pixels
  92.     Decimal number  z pixel depth in bits [16 or 8]
  93.     Decimal number  number of frames per second to project at
  94.      String          sound compression format identifier     [0 -> no sound]
  95.     Decimal number  sound replay rate in Hz (or fractions of)
  96.     Decimal number  number of sound channels recorded ("reversed" if l<->r)
  97.     Decimal number  sound precision ("linear" if linear, "unsigned" if unsigned)
  98.     Decimal number  number of frames in a chunk 
  99.  
  100.       The number of frames per chunk (last line above) must match the video data.
  101.       This information can be found be looking at the header section of the ARMovie
  102.       from which the images were extracted. 
  103.               
  104.         HEADER EXAMPLE (one sound track only):
  105.  
  106.     ARMovie
  107.     The Concert
  108.     (c) Notts University 1991
  109.     Created by Notts University, digitised by Acorn Computers
  110.     1
  111.     160 pixels
  112.     128 pixels
  113.     16 bits per pixel 
  114.     25 frames per second
  115.     1
  116.     12000 Hz samples
  117.     1 channel
  118.     8 bits per sample (exponential)
  119.     50 frames per chunk            
  120.         
  121.         Multiple Sound Tracks
  122.     ---------------------
  123.  
  124.     The single video track can have an arbitrary number of sound tracks associated
  125.     with it. Extra sound track data for each sound parameter follows the sound
  126.     track marker "|" plus the sound track number. Different sound tracks can have
  127.     completely different parameters - compression format, sample rate, number of
  128.     channels, number of bits per sample. The first sound track is played by 
  129.     default    and does not follow a |1 marker - thus the first additional sound 
  130.     track has parameters following a |2 marker.
  131.  
  132.     HEADER EXAMPLE (multiple sound tracks):
  133.     
  134.     ARMovie
  135.     The Concert
  136.     (c) Notts University 1991
  137.     Created by Notts University, digitised by Acorn Computers
  138.     1
  139.     160 pixels
  140.     128 pixels
  141.     16 bits per pixel 
  142.     25 frames per second
  143.     1                               |2   1                     |3  1
  144.     12000 Hz samples                |2   16000                 |3  20000
  145.     1 channel                       |2   2 channels            |3  2 channels
  146.     8 bits per sample (exponential) |2   16 bits per sample    |3  4 bits (adpcm)
  147.     50 frames per chunk            
  148.                         
  149.  
  150.                         
  151. THE COMMAND LINE   
  152. ----------------
  153.  
  154.         Parameters for running join on the command line are shown below,
  155.         followed by specific examples.
  156.         
  157.         -help               : on-line help (limited in comparison with this text).
  158.         
  159.         -dest f             : set destination file name (default 'JoinOp').
  160.         
  161.         -index N            : select different Header, Images, Keys combination.
  162.                               
  163.         -nokeys             : prevent the key frames being written to the new
  164.                               ARMovie generated by join.  (You can see whether 
  165.                               or not an ARMovie has keys by looking at the end 
  166.                               of the header section in the ARMovie).
  167.         
  168.         -size N             : set chunk alignment size to N.  Default is 2047 bytes.
  169.                               (The smaller the value of N, the smaller the size of
  170.                               the output file generated by join).  This is an
  171.                               optimization parameter, the value of which depends
  172.                               upon the media being used.   
  173.         
  174.         -source             : set name of source directory.
  175.         
  176.         -armovie n file/s   : name of ARMovie sound source file/s.  'n' is the 
  177.                               number of files specified, for example, -armovie 3 
  178.                               $.dir1.file1 $.dir1.file2 $.dir2.file3 (all on the 
  179.                               same line). "file1" will provide the first sound 
  180.                               track, "file2" will provide the second sound track, 
  181.                               and "file3" will provide the third sound track. If
  182.                               e.g. file1 provided both sound tracks 1 and 2 and 
  183.                               file2 provided the third sound track, then
  184.                               the -armovie parameter list would be -armovie 2
  185.                               $.dir1.file1 $.dir1.file2 . n simply tells join how
  186.                               many ARMovie sound source files you are about to
  187.                               specify.  It is nothing to do with the number of 
  188.                               sound tracks. Examples are included below.          
  189.                               
  190.                               
  191.                               
  192. EXAMPLES OF HOW TO RUN JOIN:
  193. ---------------------------
  194.  
  195.    Example 1:  join -help
  196.    ---------    
  197.                This will provide on-line help.  It will also tell you the version
  198.                number and date of the program.  Obviously, this document provides
  199.                more information than join -help does.
  200.                
  201.    Example 2:  join -source $.DataToJoin 
  202.    ---------
  203.                This will generate an ARMovie file using source data held in the
  204.                directory $.DataToJoin (source data being the header, sprite,
  205.                and so on as explained at the beginning of this document).  By
  206.                default, the name of the new ARMovie file will be "JoinOp".  The
  207.                information which you supply in the header determines whether or
  208.                not the ARMovie file will have sound, whether or not it will have 
  209.                image data, what the sound replay rate will be, and so on (see 
  210.                Header sections above).  If line ten of your header is 0 then 
  211.                join will not look for any sound data but if it is 1 then join 
  212.                will expect to see one or more sound files in $.DataToJoin or it
  213.                will expect you to specify one or more ARMovie sound source files
  214.                (examples 4,5, and 7 below).
  215.                (If you want more than one sound track do not forget to indicate
  216.                this in your header - see sub heading "Multiple Sound Tracks"
  217.                above).
  218.                
  219.    Example 3:  join -source $.DataToJoin -dest $.Movies.Elephants
  220.    ---------   
  221.                This will generate an ARMovie file called "Elephants" in the 
  222.                directory called $.Movies, using source data held in the 
  223.                directory $.DataToJoin.  Explanation is identical to example 2
  224.                above with the exception that the name of the generated ARMovie
  225.                file no longer defaults to "JoinOp".
  226.                
  227.    Example 4:  join -source $.DataToJoin -armovie 3 cdfs::replay_demo.$.movies.
  228.    ---------   shuttle $.DataToJoin.Planes $.Movies.Elephants (all on one line).
  229.    
  230.                This will generate an ARMovie file called "JoinOp" using the source
  231.                data held in $.DataToJoin.  The -armovie parameter instructs join to
  232.                use sound from other ARMovie files rather than use sound from ordinary
  233.                sound files.  ARMovie file/s acting as the sound source do not 
  234.                necessarily have to live in the same directory as all the other source
  235.                data, which is why you must specify full path names as shown in this
  236.                example.  So this example will generate an ARMovie file with three
  237.                sound tracks.  The first sound track will be extracted from cdfs::
  238.                replay_demo.$.movies.shuttle, the second sound track will be 
  239.                extracted from $.DataToJoin.Planes, and the third sound track will 
  240.                be extracted from $.Movies.Elephants.  Your header file in $.DataTo
  241.                Join must also indicate that there is to be three sound tracks (refer
  242.                to the sub heading - "Multiple Sound Tracks" above).  You should look 
  243.                at the header sections in your ARMovie sound source files to see 
  244.                what the sound replay rates are and what the sound precision should 
  245.                be for a particular sound track in your own header.  The number 3 
  246.                after -armovie simply tells join that there are three sound file 
  247.                parameters to read next.  It does not tell join anything about the 
  248.                number of sound tracks.  Example 7 is useful at this point.
  249.                
  250.    Example 5:  join -source $.DataToJoin -armovie 2 cdfs::replay_demo.$.movies.horses
  251.    ---------   cdfs::replay_demo.$.movies.shuttle
  252.                
  253.                This example is identical to example 4 above with the exception that
  254.                it will generate an ARMovie file called "JoinOp" with two sound 
  255.                tracks instead of three.  Hence 2 follows -armovie instead of the 
  256.                previous number 3. You must also ensure that your header file in 
  257.                $.DataToJoin complies with what you have specified on the command 
  258.                line ie. in this example you are telling join to look for two sound 
  259.                tracks so lines ten to thirteen of your header must indicate this 
  260.                (refer to the sub heading - "Multiple Sound Tracks" above). You 
  261.                should look at the header sections in your ARMovie sound source files 
  262.                to see what the sound replay rates are and what the sound precision 
  263.                should be for a particular sound track in your own header).
  264.                
  265.    Example 6:  join -source $.JoinData -index 3 -dest $.Movies.horses
  266.    ---------
  267.                This will generate an ARMovie file called $.Movies.horses using 
  268.                source data found in the directory $.JoinData but the -index
  269.                parameter tells join to select a different set of images and
  270.                keys and a different header.  In this case, join will look for
  271.                the directories $.JoinData.3Images0 and $.JoinData.3Keys0, and
  272.                it will read from the header called $.JoinData.3Header .
  273.                
  274.    Example 7:  join -source $.JoinData -armovie 2 $.oldmovie $.Movies.horses
  275.    ---------   
  276.                You could do this if your header indicated that two sound tracks
  277.                were required and one sound track was in $.oldmovie, the other in
  278.                $.Movies.horses .  You would also use this join command if your
  279.                header indicated that three sound tracks were required, two of
  280.                the sound tracks being in $.oldmovie and the third one being in
  281.                $.Movies.horses (or one track being in oldmovie, the other two
  282.                being in horses).  The number 2 tells join how many ARMovie sound
  283.                source files it must use.  It does not tell join anything about
  284.                the number of sound tracks.  Similarly, if your header indicated
  285.                that five sound tracks were required and $.oldmovie had five
  286.                sound tracks, you would say join -source $.JoinData -armovie 1
  287.                $.oldmovie .
  288.                
  289.    
  290.    
  291.  COMPRESSION DOWN TO 4 BITS PER SAMPLE:
  292.  -------------------------------------           
  293.     
  294.   Join will allow you to compress 16 bits per sample sound down to 4 bits per
  295.   sample (adpcm) format 2 when building an ARMovie.  To do this via the front
  296.   end (!AREncode) you need to click on the compress box when building the
  297.   ARMovie.  To do this without using !AREncode you join the movie components
  298.   in the normal way but you make sure that the sound format in your header
  299.   reads "2 adpcm" and that your header reads 16 bits per sample.  Join will
  300.   then know to compress it down.  Compression does not apply when building
  301.   multiple track ARMovies.
  302.    
  303.    
  304.         
  305. OTHER POINTS WORTH MENTIONING / TROUBLESHOOTING:              
  306. -----------------------------------------------                                
  307.  
  308.  Join will not read image data from anywhere but the image files in the source
  309.  directory.  It cannot read image data from another ARMovie file.  If you do 
  310.  want to use image files from another ARMovie file this can be done via use of the
  311.  Extract program mentioned at the end of this document.                             
  312.  
  313.  If there are no image files, only one sound track will be generated so the header 
  314.  information should only ask for 1 sound track and line 5 of the header should be 
  315.  zero.
  316.                                 
  317.  If ARMovie files are the sound source, lines 11 to 13 inclusive in header sections
  318.  of these source files should correspond to the relevent track numbers in your own
  319.  header (see sub-heading "Multiple Sound Tracks" above).
  320.  
  321.  If you use the -armovie parameter and the ARMovie file generated by join is 
  322.  obviously garbage, play back the original ARMovie source file/s and check that 
  323.  none of these are corrupt (e.g. if join was stopped by the user before completion 
  324.  then the  generated ARMovie file will be corrupt and will therefore give problems 
  325.  if it is later used by join again as a source for the sound data in  generating 
  326.  another ARMovie file). 
  327.  
  328.  If you play back the newly generated ARMovie file and it freezes unexpectedly, make
  329.  sure that you haven't attempted to run the movie with an invalid sound track number.
  330.  e.g. if you played the ARMovie by typing $.JoinOp -tracks 3 on the command line and 
  331.  JoinOp did not have a third sound track this would cause the movie to freeze at the 
  332.  start.
  333.                                                        
  334.  If your new ARMovie runs out of sound on  a particular sound track and 
  335.  you think it shouldn't have, check that the replay rate (line 11) in your header 
  336.  is identical to the replay rate given in the ARMovie sound source file for that 
  337.  particular track (this of course does not apply if you are not using the -armovie 
  338.  parameter with join).  e.g. if you use an ARMovie file with a sound track created 
  339.  at 12000 Hz and in your own header you indicate that this track is now to be 
  340.  created at 13000 Hz, you will obviously run out of sound data if the files were 
  341.  previously identical in size.  This does not matter as join will adjust the
  342.  catalogue information resulting in a period of silence at the end.
  343.                       
  344.  You cannot output to the same ARMovie file that you are reading sound data from
  345.  (this applies to use of the -armovie parameter). e.g. join -source $.DataToJoin 
  346.  -dest $.runfile -armovie $.runfile is illegal.  Join will tell you that it is 
  347.  unable to open $.runfile.
  348.  
  349.  If -armovie is given on the command line, join will not look for local Sound,
  350.  Samples, or Adpcm files.  If you want to generate an Armovie using sound from
  351.  an already existing Armovie AND from a Sound, Samples, or Adpcm file, you should
  352.  first convert the Sound, Samples, or Adpcm file into an Armovie (using join)
  353.  and then simply join the two together.
  354.  
  355.  If the files given after -armovie have multiple sound tracks, join will try to
  356.  use all the tracks in accordance with your header (see example 7 above). For
  357.  example, if your header indicates that the new Armovie will have six sound
  358.  tracks, you could use three Armovie files as the sound source.  The first 
  359.  Armovie might have three sound tracks, the second might have two, and the
  360.  third would have only one, adding up to give a total of six tracks as specified
  361.  in your header.  The total number of sound tracks in the source files must
  362.  add up to the number of sound tracks you specify in your header.  Alternatively,
  363.  for a six track header, you could use one Armovie with five sound tracks and
  364.  another Armovie with only one sound track, or you could use two Armovies each
  365.  with three sound tracks, and so on.
  366.                                 
  367.  If join is terminated prematurely (e.g. user presses escape), an exception
  368.  handler will ensure that any open files are closed.  For obvious reasons this
  369.  only applies to files opened by join.                               
  370.  
  371.  There are two classes of error message.  Warning errors may be ignored 
  372.  depending on context and whether or not a fatal error follows.  Fatal errors
  373.  will actually stop the program at that point.  As mentioned above, any files
  374.  left open by join will be closed by the exception handler.
  375.  
  376.  As well as taking in parameters from the command line, join will also look for
  377.  parameters held in the environment variable join$ExtraArgs.  The split can 
  378.  occur anywhere.  e.g. join -source $.DataToJoin -de may be entered on the command
  379.  line, while st $.runit may be held in join$ExtraArgs.  join will simply join the
  380.  two together to produce join -source $.DataTojoin -dest $.runit.
  381.                                 
  382.  A separate program exists called "extract", which does the reverse of what "Join" 
  383.  does.  "Extract" can take an ARMovie file and extract its header, sprite, keys (if 
  384.  there are any), sound track/s, and images.  It is perfectly acceptable for this
  385.  extracted data to be used by Join. (Extract is accompanied by written documentation
  386.  which you should read if you have never used it before). If you want join to use 
  387.  sound tracks from other ARMovie files join can do this directly (as mentioned many 
  388.  times above) using the -armovie parameter.  But if you want join to use image data 
  389.  from other ARMovie files you must use Extract to generate the image data which can
  390.  then be used by join.                        
  391.                                                            
  392.                                                            
  393.  DIFFERENCES BETWEEN CURRENT VERSION (3.07) & PREVIOUS VERSION (3.06):
  394.  ----------------------------------------------------------------------------
  395.  
  396.  In the previous version it was a requirement that the string "frames per     
  397.  second" be present along with the actual value in the header.  This          
  398.  requirement no longer applies.                                               
  399.  
  400.  
  401.                                                                                
  402.  OUTSTANDING:
  403.  -----------
  404.  
  405.  
  406.                                                                                
  407. ===================================================================================